import request from '../../api/request'

// 查询历史群发消息记录
export function gethistorymessageapi(data) {
    return request.get('/api/v1/mass/message/list',data).then(res => {
        return res.data
    })
}

// 获取群发消息详细信息
export function gethistorymessagedetailapi(id) {
    return request.get('/api/v1/mass/message/getInfo?id=' + id).then(res => {
        return res.data
    })
}

// 新增群发消息
export function addnewmessageapi(data) {
    return request.post('/api/v1/mass/message/add', data).then(res => {
        return res.data
    })
}

// 查询并创建发送人员
export function queryandcreatethesender(data) {
    return request.post('/api/v1/mass/massMessagePersonnel/queryCreatMassMessagePersonnel', data).then(res => {
        return res.data
    })
}

// 查询群发消息人员列表
export function querythelistofmassmessagers(data) {
    return request.get('/api/v1/mass/massMessagePersonnel/list', data).then(res => {
        return res.data
    })
}

//更新发送人员选中状态 /api/v1/mass/massMessagePersonnel/updateSelectStatus
export function updatepitchon(data) {
    return request.put('/api/v1/mass/massMessagePersonnel/updateSelectStatus', data).then(res => {
        return res.data
    })
}

// 批量更新发送人员选中状态
export function updatepitchons(data) {
    return request.put('/api/v1/mass/massMessagePersonnel/batchUpdateSelectStatus', data).then(res => {
        return res.data
    })
}

// 获取短信条数余额
export function getmsessageresidueapi(data) {
    return request.get('/api/v1/mass/massMessageBalance/mass-balance', data).then(res => {
        return res.data
    })
}
// 群发消息
export function sendmessageapi(data) {
    return request.post('/api/v1/mass/message/send-mass', data).then(res => {
        return res.data
    })
}
// 获取被派遣单位列表
export function getDispatchList(data) {
    return request.get('/api/v1/pay/period-insur/serve-company/list', data).then(res => {
        return res.data.data
    })
}

// 查询充值记录
export function getmessagerechargehistoryapi(data) {
    return request.get('/api/v1/mass/massMessageRechargeRecord/list', data).then(res => {
        return res.data.data
    })
}
// B端公对公充值短信申请
export function massMessageRechargeRecordapi(data) {
    return request.post('/api/v1/mass/massMessageRechargeRecord', data).then(res => {
        return res.data.data
    })
}

// 查看群发消息充值详情
export function getmessagerechargedetailapi(id) {
    return request.get('/api/v1/mass/massMessageRechargeRecord/recharge-detail?id=' + id).then(res => {
        return res.data.data
    })
}